import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'

const routes = [
  {
    path: '/',
    name: 'home',
    component: HomeView,
    redirect:'',
    children:[
      {path: '/notice', component: () => import('../views/notice/NoticeView.vue')},
      {path: '/noticeDetails', component: () => import('../views/notice/NoticeDetailsView.vue')},
      {path: '/systemNotice', component: () => import('../views/system_admin/SystemNoticeView.vue')},
      {path: '/operateLog', component: () => import('../views/system_admin/OperateLogView.vue')},
      {path: '/orders', component: () => import('../views/orders/OrderView.vue')}
    ]
  },
  {path: '/login', component: () => import('../views/LoginView')}
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router